{* include file="tpl_defaults/header.html" *}

    <div id="main">

        <!-- 面包屑导航 -->
        <div id="bread" class="box list sky-blue">
            <span class="left">
                <a href="{*$app_bbs_url*}">爱居社区</a>
				{* foreach from=$aMenuForum  key = key item=item *}
				{*if $item->fid eq $fid*}
				   <img src="/images/divider.gif" /> <a href="list.php?fid={*$item->fid*}">{*$item->name*}</a>
				{*else*}
				   <img src="/images/divider.gif" /> {*$item->name*}
				{*/if*}
				{*/foreach*}
            </span>
        </div>

        <!-- 发布新帖子 -->
        <div class="list">
            <h4 class="block_sub">修改帖子</h4>
            <div class="post_table mainbox">
                <form id="form1" name="form1" method="post" action="modify.php?action=do" enctype="multipart/form-data" >
                <table>
                    <tbody>
                        <tr>
                            <td class="npostl">标题</td>
                            <td class="npostr">
                                
								{*if $opost->first eq 'Y'*}
								<span class="txt" style="display:block; width:96px; height:16px; *height:18px; _height:18px; margin:1px 5px 0 0; float:left; overflow:hidden;">					<select name="sortid" style="margin:-2px; width:100px;">
									<option value="" selected>分类...</option>
									{* foreach from=$aSort  key = key item=item *}
									<option value="{*$item->sortid*}" {*if $oThread->sortid eq $item->sortid*}selected{*/if*}>{*$item->name*}</option>
									{*/foreach*}
								</select>
                                </span>
								{*/if*}
                                <input class="npost-subject txt" type="text" name="subject" value="{*$opost->subject*}"></input>
                                <em>(必填)</em>
                            </td>
                        </tr>
                    </tbody>
					{*if $opost->first eq 'Y'*}
                    <tbody>
                        <tr>
                            <td class="npostl">主题图标</td>
                            <td class="npostr">
                                <ul class="npost-icon">
                                    <li> <input type="radio" name="icon" value=""  {*if $oThread->icon eq ''*}checked{*/if*}> <img src="/images/icon/1.gif"></li>
                                    <li><input type="radio" name="icon" value="2.gif" {*if $oThread->icon eq '2.gif'*}checked{*/if*}> <img src="/images/icon/2.gif"></li>
                                    <li><input type="radio" name="icon" value="3.gif" {*if $oThread->icon eq '3.gif'*}checked{*/if*}> <img src="/images/icon/3.gif"></li>
                                    <li><input type="radio" name="icon" value="4.gif" {*if $oThread->icon eq '4.gif'*}checked{*/if*}> <img src="/images/icon/4.gif"></li>
                                    <li><input type="radio" name="icon" value="5.gif" {*if $oThread->icon eq '5.gif'*}checked{*/if*}> <img src="/images/icon/5.gif"></li>
                                    <li><input type="radio" name="icon" value="6.gif" {*if $oThread->icon eq '6.gif'*}checked{*/if*}> <img src="/images/icon/6.gif"></li>
                                    <li><input type="radio" name="icon" value="7.gif" {*if $oThread->icon eq '7.gif'*}checked{*/if*}> <img src="/images/icon/7.gif"></li>
                                    <li><input type="radio" name="icon" value="8.gif" {*if $oThread->icon eq '8.gif'*}checked{*/if*}> <img src="/images/icon/8.gif"></li>
                                    <li><input type="radio" name="icon" value="9.gif" {*if $oThread->icon eq '9.gif'*}checked{*/if*}> <img src="/images/icon/9.gif"></li>
                                    <li><input type="radio" name="icon" value="10.gif" {*if $oThread->icon eq '10.gif'*}checked{*/if*}> <img src="/images/icon/10.gif"></li>
                                    <li><input type="radio" name="icon" value="11.gif" {*if $oThread->icon eq '11.gif'*}checked{*/if*}> <img src="/images/icon/11.gif"></li>
                                    <li><input type="radio" name="icon" value="12.gif" {*if $oThread->icon eq '12.gif'*}checked{*/if*}> <img src="/images/icon/12.gif"></li>
                                    <li><input type="radio" name="icon" value="13.gif" {*if $oThread->icon eq '13.gif'*}checked{*/if*}> <img src="/images/icon/13.gif"></li>
                                    <li><input type="radio" name="icon" value="14.gif" {*if $oThread->icon eq '14.gif'*}checked{*/if*}> <img src="/images/icon/14.gif"></li>
                                </ul>
                            </td>
                        </tr>
                    </tbody>
					{*/if*}
                    <tbody>
                        <tr>
                            <td class="npostl">
                                <fieldset class="postrules">
                                    <legend>选项</legend>
                                    <dl>
                                        <dd><input type="checkbox" name="allowubbcode" value="Y" {*if $oGroup->allowubbcode eq 'N'*}disabled{*/if*} {*if $opost->allowubbcode eq 'Y'*}checked{*/if*} />使用CTB代码</dd>
                                        <dd><input type="checkbox" name="allowhtml" value="Y" {*if $oGroup->allowhtml eq 'N'*}disabled{*/if*} {*if $opost->allowhtml eq 'Y'*}checked{*/if*}/>使用HTML代码</dd>
                                        <dd><input type="checkbox" name="allowsmiley" value="Y" {*if $opost->allowsmiley eq 'Y'*}checked{*/if*}/>使用图片解析</dd>
                                        <dd><input type="checkbox" name="allowparseurl" value="Y" {*if $opost->allowparseurl eq 'Y'*}checked{*/if*}/>使用URL解析</dd>
                                        <dd><input type="checkbox" name="usesig" value="Y" {*if $oGroup->allowsig eq 'N'*}disabled{*/if*} {*if $opost->usesig eq 'Y'*}checked{*/if*}/>使用我的签名</dd>
                                        <dd><input type="checkbox" name="isanonymous" value="Y" {*if $oGroup->allowanonymous eq 'N'*}disabled{*/if*} {*if $opost->anonymous eq 'Y'*}checked{*/if*}/>使用匿名发帖</dd>
										{*if $opost->first eq 'Y'*}
                                        <dd><input type="checkbox" name="readreply" value="1"  {*if $oGroup->allowpostreply eq 'N'*}disabled{*/if*} {*if $oThread->readreply eq '1'*}checked{*/if*}/>隐藏此帖(回复可见)</dd>
										{*/if*}
                                    </dl>
                                </fieldset>
                            </td>
                            <td class="npostr">
                                <div class="npost-txtarea">

<style type="text/css">
<!--
.btnCode {
	background:transparent url({*$sys_scripts_url*}xheditor/syntaxhighlighter/code.gif) no-repeat 16px 16px;
	background-position:2px 2px;
}
.btnFlv {
	background:transparent url({*$sys_scripts_url*}xheditor/mediaplayer/flv.gif) no-repeat 16px 16px;
	background-position:2px 2px;
}
-->
</style>
<script type="text/javascript" src="{*$sys_scripts_url*}jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="{*$sys_scripts_url*}xheditor/xheditor.min.js?v=1.0.0-final"></script>
<script type="text/javascript" src="{*$sys_scripts_url*}xheditor/xheditor_plugins/ubb.min.js"></script>
<script type="text/javascript">
$(pageInit);
function pageInit()
{
	$('#elm1').xheditor({upImgUrl:"post_upload.php?immediate=1",upImgExt:"jpg,jpeg,gif,png",plugins:{Code:{c:'btnCode',t:'插入代码',h:1,e:function(){
			var _this=this;
			var htmlCode='<div><select id="xheCodeType"><option value="html">HTML/XML</option><option value="javascript">JavaScript</option><option value="css">CSS</option><option value="php">PHP</option><option value="csharp">C#</option><option value="cpp">C++</option><option value="java">Java</option><option value="python">Python</option><option value="ruby">Ruby</option><option value="vb">Visual Basic</option><option value="delphi">Delphi</option><option value="sql">SQL</option><option value="plain">其它</option></select></div><div><textarea id="xheCodeValue" wrap="soft" spellcheck="false" style="width:300px;height:100px;" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>';			var jCode=$(htmlCode),jType=$('#xheCodeType',jCode),jValue=$('#xheCodeValue',jCode),jSave=$('#xheSave',jCode);
			jSave.click(function(){
				_this.loadBookmark();
				_this.pasteText('[code='+jType.val()+']\r\n'+jValue.val()+'\r\n[/code]');
				_this.hidePanel();
				return false;	
			});
			_this.showDialog(jCode);
		}},Flv:{c:'btnFlv',t:'插入Flv视频',h:1,e:function(){
			var _this=this;
			var htmlFlv='<div>Flv文件:&nbsp; <input type="text" id="xheFlvUrl" value="http://" class="xheText" /></div><div>宽度高度: <input type="text" id="xheFlvWidth" style="width:40px;" value="480" /> x <input type="text" id="xheFlvHeight" style="width:40px;" value="400" /></div><div style="text-align:right;"><input type="button" id="xheSave" value="确定" /></div>';
			var jFlv=$(htmlFlv),jUrl=$('#xheFlvUrl',jFlv),jWidth=$('#xheFlvWidth',jFlv),jHeight=$('#xheFlvHeight',jFlv),jSave=$('#xheSave',jFlv);
			jSave.click(function(){
				_this.loadBookmark();
				_this.pasteText('[flv='+jWidth.val()+','+jHeight.val()+']'+jUrl.val()+'[/flv]');
				_this.hidePanel();
				return false;	
			});
			_this.showDialog(jFlv);
		}}},
		tools:'full',showBlocktag:false,forcePtag:false,beforeSetSource:ubb2html,beforeGetSource:html2ubb,emots:{msn:{name:'MSN',count:40,width:22,height:22,line:8}},emotMark:true,shortcuts:{'ctrl+enter':submitForm}});
}
function submitForm(){$('#frmDemo').submit();}
</script>
                                    <textarea name="elm1" id="elm1" style="height:250px; overflow-y:auto;width: 100%"  rows="12" cols="80" >{*$opost->content*}</textarea>
                                </div>
								{*if $opost->first eq 'Y'*}
                                <fieldset class="npost-cat fieldset">
                                    <legend>帖子类型</legend>
                                    <p><input type="radio" name="type" class="radio" value="thread" {*if $oThread->type eq 'thread'*}checked{*/if*}>普通主题</p>
                                    <p><input type="radio" name="type" class="radio" value="thread_level" {*if $oGroup->allowpostlevel eq 'N'*}disabled{*/if*} {*if $oThread->type eq 'thread_level'*}checked{*/if*}/>阅读权限<input class="txt" type="text" name="readlevel" size="5" value="{*$oThread->readlevel*}"  {*if $oGroup->allowpostlevel eq 'N'*}disabled{*/if*} >只有当会员所在群组高于此限制才可以阅读，0或空为不限制</p>
                                    <p><input type="radio" name="type" class="radio" value="thread_order" {*if $oGroup->allowpostorder eq 'N'*}disabled{*/if*} {*if $oThread->type eq 'thread_order'*}checked{*/if*}/>出售主题<input class="txt" type="text" name="readorder" size=5 value="{*$oThread->readorder*}" {*if $oGroup->allowpostorder eq 'N'*}disabled{*/if*} >只有当会员付出此积分后才可以阅读，最大限制 <b>{*$oGroup->maxorder*}</b></p>
                                    <p><input type="radio" name="type" class="radio" value="thread_price" {*if $oGroup->allowpostprice eq 'N'*}disabled{*/if*} {*if $oThread->type eq 'thread_price'*}checked{*/if*}/>悬赏主题<input class="txt" type="text" name="askprice" size=5 value="{*$oThread->askprice*}" {*if $oGroup->allowpostprice eq 'N'*}disabled{*/if*} >当有人回答您的问题后，你需要向对方支付此积分，最大限制 <b>{*$oGroup->minprice*}</b>-<b>{*$oGroup->maxprice*}</b></p>
                                </fieldset>
								{*/if*}
								{*if $oGroup->allowpnew eq 'Y' && $oThread->plugintype > 0 && $opost->first eq 'Y'*}
                                <fieldset class="npost-plugin fieldset">
                                    <legend>帖子插件</legend>
                                    <p>类型：<input type="radio" name="ptype" class="radio" value="0" disabled>无插件
                                       <input type="radio" name="ptype" class="radio" value="1" {*if $oPlugin->type eq '1'*}checked{*else*}disabled{*/if*}>单选投票
                                       <input type="radio" name="ptype" class="radio" value="2" {*if $oPlugin->type eq '2'*}checked{*else*}disabled{*/if*}>多选投票
                                       <input type="radio" name="ptype" class="radio" value="3" {*if $oPlugin->type eq '3'*}checked{*else*}disabled{*/if*}>参与活动
                                    <p/>
                                    <p>选项：<input type="checkbox" name="limitguest" value="Y" {*if $oPlugin->limitguest eq 'Y'*}checked{*/if*}>允许非注册用户参与
                                       <input type="checkbox" name="limitip" value="Y" {*if $oPlugin->limitip eq 'Y'*}checked{*/if*}>限制IP只参与一次
                                       <input type="text" name="limitdate" class="txt" value="{*$oPlugin->limitdate*}" size="10">活动截止时间
                                    <p/>
                                    <p><textarea name="pitems" rows="5" cols="40" class="txt">{*$oPlugin->sitems*}</textarea>
                                       <br/>*每一行为一个选项
                                       <input type="hidden" name="plugid" value="{*$oPlugin->plugid*}">
                                    </p>
                                </fieldset>
								{*/if*}
								{*if $oGroup->allowupload eq 'Y'*}
                                <fieldset class="npost-upload fieldset">
									{* foreach from=$aUploadFile  key = key item=item *}
									<!--
									&nbsp;<INPUT TYPE="checkbox" NAME="filecheck1[{*$key*}]" value="Y" checked> 
									描述<input type="text" name="filename1[{*$key*}]" size=10 value="{*$item->intro*}">&nbsp;{*$item->oldname*}
									<input type="checkbox" name="filereply1[{*$key*}]" value="1" {*if $item->readreply eq '1'*}checked{*/if*}>隐藏附件(回复可见) 
									<input type="checkbox" name="fileorder1[{*$key*}]" value="credit" {*if $item->ordertype eq 'credit'*}checked{*/if*}>售
									<input type="text" name="filecredit1[{*$key*}]" size=4 value="{*$item->ordernumber*}">积分<br/>
									<INPUT TYPE="hidden" NAME="fileid1[{*$key*}]" value="{*$item->fileid*}">
									-->
                                    <dl class="attac_add">
                                        <dd>
                                            <input type="checkbox" name="filecheck1[{*$key*}]" value="Y" checked/>
                                            描述<input class="txt" type="text" name="filename1[{*$key*}]" value="{*$item->intro*}"/>
                                        </dd>
                                        <dd class="attac_name">{*$item->oldname*}</dd>
                                        <dd>
                                            <input type="checkbox" name="filereply1[{*$key*}]" value="1" {*if $item->readreply eq '1'*}checked{*/if*}/>隐藏附件(回复可见)
                                            <input type="checkbox" name="fileorder1[{*$key*}]" value="credit" {*if $item->ordertype eq 'credit'*}checked{*/if*}/>售
											<input type="text"  class="minitxt txt" name="filecredit1[{*$key*}]" size=4 value="{*$item->ordernumber*}">积分
											<input type="checkbox" name="fileimages1[{*$key*}]" size=4 value="Y" {*if $item->images eq 'Y'*}checked{*/if*}>图片插入<br/>
											<INPUT TYPE="hidden" class="minitxt txt" NAME="fileid1[{*$key*}]" value="{*$item->fileid*}">
											<INPUT TYPE="hidden" class="minitxt txt" NAME="fileimages2[{*$key*}]" value="{*$item->fileext*}">
                                        </dd>
                                    </dl>
									{*/foreach*}

                                    <legend>上传附件</legend>
                                    <p>描述<input class="txt" type="text" name="filename[]" size="10">
                                    <input class="upload txt" style="border:1px;" type="file" id="fileup" name="fileup[]" />
                                    <input type="checkbox" name="filereply[]" value="1"/> 隐藏附件(回复可见)
                                    <input type="checkbox" name="fileorder[]" value="credit"/>售<input class="minitxt txt" type="text"  name="filecredit[]" />积分</p>
                                    <p>上传文件必须小于({*$uploadsize*})KB <br />上传允许类型：{*$uploadtype*} </p>
                                </fieldset>
								{*/if*}
                                <div class="npost-submit">
									<input type="hidden" name="fid" value="{*$fid*}">
                                    <input class="submit" type="submit" value="发表主题" />
                                </div>
                                <div class="npost-rules">
                                    <blockquote class="gray">
                                        这里发帖，表示您接受了爱居社区的 用户行为准则。<br />
                                        请您对您的言行负责，并遵守中华人民共和国有关法律、法规,尊重网上道德。
                                    </blockquote>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
				<input type="hidden" name="fid" value="{*$fid*}">
				<input type="hidden" name="pid" value="{*$opost->pid*}">
				<input type="hidden" name="tid" value="{*$opost->tid*}">
                </form>
            </div>
        </div>

    </div>
{* include file="tpl_defaults/footer.html" *}

